Swagger\Client\CollectionsApi
All URIs are relative to //api.estuary.tech/
Method | HTTP request | Description |
---|---|---|
collectionsColuuidCommitPost | POST /collections/{coluuid}/commit | Produce a CID of the collection contents |
collectionsColuuidContentsDelete | DELETE /collections/{coluuid}/contents | Deletes a content from a collection |
collectionsColuuidDelete | DELETE /collections/{coluuid} | Deletes a collection |
collectionsColuuidGet | GET /collections/{coluuid} | Get contents in a collection |
collectionsColuuidPost | POST /collections/{coluuid} | Add contents to a collection |
collectionsFsAddPost | POST /collections/fs/add | Add a file to a collection |
collectionsGet | GET /collections/ | List all collections |
collectionsPost | POST /collections/ | Create a new collection |
collectionsColuuidCommitPost
string collectionsColuuidCommitPost($coluuid)
Produce a CID of the collection contents
This endpoint is used to save the contents in a collection, producing a top-level CID that references all the current CIDs in the collection.
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: bearerAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\CollectionsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$coluuid = "coluuid_example"; // string | coluuid
try {
$result = $apiInstance->collectionsColuuidCommitPost($coluuid);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CollectionsApi->collectionsColuuidCommitPost: ', $e->getMessage(), PHP_EOL;
}
?>
Parameters
Name | Type | Description | Notes |
---|---|---|---|
coluuid | string | coluuid |
Return type
string
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
collectionsColuuidContentsDelete
string collectionsColuuidContentsDelete($body, $coluuid)
Deletes a content from a collection
This endpoint is used to delete an existing content from an existing collection. If two or more files with the same contentid exist in the collection, delete the one in the specified path
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: bearerAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\CollectionsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \Swagger\Client\Model\ApiDeleteContentFromCollectionBody(); // \Swagger\Client\Model\ApiDeleteContentFromCollectionBody | Variable to use when filtering for files (must be either 'path' or 'content_id')
$coluuid = "coluuid_example"; // string | Collection ID
try {
$result = $apiInstance->collectionsColuuidContentsDelete($body, $coluuid);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CollectionsApi->collectionsColuuidContentsDelete: ', $e->getMessage(), PHP_EOL;
}
?>
Parameters
Name | Type | Description | Notes |
---|---|---|---|
body | \Swagger\Client\Model\ApiDeleteContentFromCollectionBody | Variable to use when filtering for files (must be either 'path' or 'content_id') | |
coluuid | string | Collection ID |
Return type
string
Authorization
HTTP request headers
- Content-Type: /
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
collectionsColuuidDelete
string collectionsColuuidDelete($coluuid)
Deletes a collection
This endpoint is used to delete an existing collection.
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: bearerAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\CollectionsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$coluuid = "coluuid_example"; // string | Collection ID
try {
$result = $apiInstance->collectionsColuuidDelete($coluuid);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CollectionsApi->collectionsColuuidDelete: ', $e->getMessage(), PHP_EOL;
}
?>
Parameters
Name | Type | Description | Notes |
---|---|---|---|
coluuid | string | Collection ID |
Return type
string
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
collectionsColuuidGet
\Swagger\Client\Model\CollectionsCollectionListResponse[] collectionsColuuidGet($coluuid, $dir)
Get contents in a collection
This endpoint is used to get contents in a collection. If no colpath query param is passed
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: bearerAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\CollectionsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$coluuid = "coluuid_example"; // string | coluuid
$dir = "dir_example"; // string | Directory
try {
$result = $apiInstance->collectionsColuuidGet($coluuid, $dir);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CollectionsApi->collectionsColuuidGet: ', $e->getMessage(), PHP_EOL;
}
?>
Parameters
Name | Type | Description | Notes |
---|---|---|---|
coluuid | string | coluuid | |
dir | string | Directory | [optional] |
Return type
\Swagger\Client\Model\CollectionsCollectionListResponse[]
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
collectionsColuuidPost
string collectionsColuuidPost($body, $coluuid, $dir, $overwrite)
Add contents to a collection
This endpoint adds already-pinned contents (that have ContentIDs) to a collection.
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: bearerAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\CollectionsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = array(56); // int[] | Content IDs to add to collection
$coluuid = "coluuid_example"; // string | Collection UUID
$dir = "dir_example"; // string | Directory
$overwrite = "overwrite_example"; // string | Overwrite conflicting files
try {
$result = $apiInstance->collectionsColuuidPost($body, $coluuid, $dir, $overwrite);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CollectionsApi->collectionsColuuidPost: ', $e->getMessage(), PHP_EOL;
}
?>
Parameters
Name | Type | Description | Notes |
---|---|---|---|
body | int[] | Content IDs to add to collection | |
coluuid | string | Collection UUID | |
dir | string | Directory | [optional] |
overwrite | string | Overwrite conflicting files | [optional] |
Return type
string
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
collectionsFsAddPost
string collectionsFsAddPost($coluuid, $content, $dir, $overwrite)
Add a file to a collection
This endpoint adds a file to a collection
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: bearerAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\CollectionsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$coluuid = "coluuid_example"; // string | Collection ID
$content = "content_example"; // string | Content
$dir = "dir_example"; // string | Directory inside collection
$overwrite = "overwrite_example"; // string | Overwrite file if already exists in path
try {
$result = $apiInstance->collectionsFsAddPost($coluuid, $content, $dir, $overwrite);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CollectionsApi->collectionsFsAddPost: ', $e->getMessage(), PHP_EOL;
}
?>
Parameters
Name | Type | Description | Notes |
---|---|---|---|
coluuid | string | Collection ID | |
content | string | Content | |
dir | string | Directory inside collection | [optional] |
overwrite | string | Overwrite file if already exists in path | [optional] |
Return type
string
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
collectionsGet
\Swagger\Client\Model\CollectionsCollection[] collectionsGet()
List all collections
This endpoint is used to list all collections. Whenever a user logs on estuary, it will list all collections that the user has access to. This endpoint provides a way to list all collections to the user.
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: bearerAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\CollectionsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$result = $apiInstance->collectionsGet();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CollectionsApi->collectionsGet: ', $e->getMessage(), PHP_EOL;
}
?>
Parameters
This endpoint does not need any parameter.
Return type
\Swagger\Client\Model\CollectionsCollection[]
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
collectionsPost
\Swagger\Client\Model\CollectionsCollection collectionsPost($body)
Create a new collection
This endpoint is used to create a new collection. A collection is a representaion of a group of objects added on the estuary. This endpoint can be used to create a new collection.
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: bearerAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\CollectionsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \Swagger\Client\Model\ApiCreateCollectionBody(); // \Swagger\Client\Model\ApiCreateCollectionBody | Collection name and description
try {
$result = $apiInstance->collectionsPost($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CollectionsApi->collectionsPost: ', $e->getMessage(), PHP_EOL;
}
?>
Parameters
Name | Type | Description | Notes |
---|---|---|---|
body | \Swagger\Client\Model\ApiCreateCollectionBody | Collection name and description |
Return type
\Swagger\Client\Model\CollectionsCollection
Authorization
HTTP request headers
- Content-Type: /
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]